import request from '@/utils/request'

// 患者详情
export function details(params) {
  return request({
    url: '/demographics/details',
    method: 'get',
    params
  })
}

// 一般信息
export function general(params) {
  return request({
    url: '/demographics/general',
    method: 'get',
    params
  })
}

// 生活习惯
export function habits(params) {
  return request({
    url: '/demographics/habits',
    method: 'get',
    params
  })
}

// 联系方式
export function phone(params) {
  return request({
    url: '/demographics/phone',
    method: 'get',
    params
  })
}

// 上传excel文件
export function upload_excel(params, data) {
  return request({
    url: '/demographics/upload_excel',
    method: 'post',
    headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
    params,
    data
  })
}

// 手动上传数据
export function upload(params, data) {
  return request({
    url: '/demographics/upload',
    method: 'post',
    params,
    data
  })
}
